package com.mfangsoft.zhuangjialong.common.utils;

import java.net.URI;
import java.net.URLEncoder;
import java.util.Map;
import com.mongodb.util.JSON;


/**
 * 圣象报名活动成功以后并且绑定导购给消费者发送短信
 * @author top
 *
 */
public class NoteUtils {
	public static Map<String,Object> sendNode(String vTemplateCode,String customerPhone,String customerName,String sellerName) throws Exception{
		String s="{\"custname\":\""+customerName+"\",\"sname\":\""+sellerName+"\"}";
		String encode = URLEncoder.encode(s, "GBK");
		String a = "http://payws.erplus.com.cn:8021/SmsGate.ashx?type=sendsms&vAccessKeyId=68553266scb&vAccessKeySecret=Scb66235586!&vTemplateCode="+vTemplateCode+"&vPhoneNumbers="+customerPhone
				+"&vTemplateParam="+encode;
		URI uri = new URI(a);
		String resultJson = HttpClientUtil.sendGetForJson(uri);
		if(resultJson != null){
			Map<String,Object> map = (Map<String,Object>)JSON.parse(resultJson);
			return map;
		}
		return null;
	}
	
	public static void main(String[] args) {
		try {
			sendNode("SMS_121911530", "17610352808", "凯旋", "李喆");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

//凯旋手机号:17610352808
